// 此程序直接用gcc编译会报错：undefined reference to `main'
// 通过以下命令编译连接
// as hello.s -o hello.o
// ld hello.o -o hello

.data
        msg: .string "Hello, world!\n"
        len = . - msg

.text
.global _start

_start:
        movl $len, %edx
        movl $msg, %ecx
        movl $1, %ebx
        movl $4, %eax
        int $0x80

        movl $0, %ebx
        movl $1, %eax
        int $0x80
